package jtk.project4.fleet.screen.addBrowsePayMent;

import java.awt.FlowLayout;

//import com.sun.corba.se.spi.orbutil.fsm.Action;

import jtk.project4.fleet.field.BrowsePaymentsButtonFields;
import jtk.project4.fleet.field.BrowsePaymentsFields;
import jtk.project4.fleet.field.GeneralInformationField;
import jtk.project4.fleet.field.PersonnelInformationField;
import nl.coderight.jazz.form.FormField;
import nl.coderight.jazz.form.FormHeader;
import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.FormView;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.control.TabControl;
import nl.coderight.jazz.form.control.TabItem;
import nl.coderight.jazz.form.field.TableField;
import nl.coderight.jazz.form.field.button.CheckButton;
import nl.coderight.jazz.form.field.button.PushButton;

public class BrowsePaymentsView extends FormView{

	private PushButton closeButton;
	private PushButton helpButton;
	
	//private Action closeAction;
	//private Action helpAction;
	
	
	@Override
	protected void init() {
		// TODO Auto-generated method stub
		//createAction();
		//createForm();		
		createFields();
		createLayout();
		
		//createGeneralTab();
	}
	
	private void createLayout() {
		//setHeader(createHeader());
		addField(createForm());
	}
	
	private void createFields() {
		helpButton = new PushButton("Help");
		closeButton = new PushButton("Close");
	}
	
	
	private GroupControl createForm() {
		GroupControl form = new GroupControl();
		form.addField(new BrowsePaymentsFields(""), NORTH);
		form.addField(new BrowsePaymentsButtonFields(""),CENTER);
		form.addField(createButtons(), SOUTH);		
		return form;
	}
	
	
	private GroupControl createButtons() {
		GroupControl buttons = new GroupControl();
		buttons.setLayout(new FlowLayout(FlowLayout.RIGHT));
		//buttons.addField(addButton);
		//buttons.addField(editButton);
		//buttons.addField(deleteButton);
		//buttons.addField(printButton);
		//buttons.addField(searchButton);
		buttons.addField(helpButton);
		buttons.addField(closeButton);
		return buttons;
	}
}
